home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 2.iso
/
ACORNUSERS
/
CBSA
/
EDUCATION
/
SAVER
/
cc
/
WimpError
< prev
next >
Wrap
Text File
|
1997-12-13
|
850b
|
53 lines
//-----------------------------------
// WimpError.c
//-----------------------------------
// GCC does'nt support C++ exception (throw, catch and try)
#include "os.h"
#include "trap.h"
void throw(os_error *e)
{
int r[10];
r[0] = int(e);
r[1] = 0;
r[2] = int("OS Error");
(void) os_swi(Wimp_ReportError,r);
}
void throw(char *s)
{
os_error err;
int r[10];
err.err = 0;
strcpy(err.mess,s);
r[0] = int(&err);
r[1] = 0;
r[2] = int("Wimp Error");
(void) os_swi(Wimp_ReportError, r);
}
void Open_WindowCommand(char *title)
{
int r[10];
r[0] = (int) title;
os_swi(Wimp_CommandWindow,r);
}
void Open_WindowCommand()
{
int r[10];
r[0] = 1;
os_swi(Wimp_CommandWindow,r);
}
void Close_WindowCommand(int immediat)
{
int r[10];
r[0] = 0;
if (immediat != 0) r[0] = -1;
os_swi(Wimp_CommandWindow,r);
}